
const Router = require('koa-router')
const router = new Router();
const query = require('../db/mysql')
const {getList,addList,editList,delList} = require('../controller/list.js')
const jwt = require("jsonwebtoken")
// 鉴权中间件
const auth = require('../middleware/auth')
// 获取列表接口
router.get('/blog/list', auth,getList)
// 添加博客
router.post('/blog/list',auth, addList)
// 编辑博客
router.put('/blog/list',auth,editList)
// 删除博客
router.delete('/blog/list/:id', auth,delList)


module.exports = router;